
const Api = {
    sendAccountDetail( app ) {
        axios.get("/trade/acount/detail").then( resp => {
            if( resp.status == 200 ){
                // app.account = resp.data 
                app.$notify.success({
                  message: '远程重载用户信息成功',
                  duration : 3*1000 ,
                  showClose: false
                });
                this.account( app )
            }else{
                app.$notify.error({
                    message: '远程重载用户信息失败:' + resp.status,
                    duration : 3*1000 ,
                    showClose: false
                  });
            }
        })
    } ,
    account( app ) {
        axios.get("/qmt/account").then( resp => {
            if( resp.status == 200 ){
                app.account = resp.data 
                app.$notify.success({
                  title: 'Info',
                  message: '刷新账户信息成功',
                  duration : 3*1000 ,
                  showClose: false
                });
            }else{
                app.$notify.success({
                    title: 'error',
                    message: '刷新账户失败:' + resp.status,
                    duration : 3*1000 ,
                    showClose: false
                  });
            }
        })
    },
    login( app ) {
        axios.get("/qmt/account").then( resp => {
            if( resp.status == 200 ){
                app.$notify.success({
                  message: 'QMTServer授权成功',
                  duration : 3*1000 ,
                  showClose: false
                });
            }else{
                app.$notify.error({
                    message: 'QMTServer授权失败:' + resp.status,
                    duration : 3*1000 ,
                    showClose: false
                  });
            }
        })
    }
}